package com.huawei.appgallery.updatemanager.ui.cardkit.bean;

import com.huawei.appgallery.foundation.card.base.bean.BaseDistCardBean;
import java.io.Serializable;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Comparator;
import java.util.Date;
import java.util.Locale;
import o.czi;

public class UpdateRecordCardBean extends BaseDistCardBean implements Serializable, Comparator<UpdateRecordCardBean> {
    public static final int FROM_PRE_DOWNLOAD = 1;
    public static final int FROM_USER_DOWNLOAD = 0;
    private static final String TAG = "UpdateRecordCardBean";
    public static final int UPGRADE_SAME_SIGNATURE = 0;
    public static final int UPGRADE_UNSAME_SIGNATURE = 1;
    private static final long serialVersionUID = -1460800083170908771L;
    private int apkReadySouce = 0;
    private String diffHash_;
    private long diffSize_;
    private String hash_;
    private boolean isExpand = false;
    private boolean isIgnore = false;
    private boolean isIgnoreShow = false;
    private boolean isLastCard = false;
    private int kindId_;
    private String newFeatures_;
    private String oldHashCode;
    private String oldMD5Code;
    private int oldVersionCode_;
    private String oldVersionName_;
    private String releaseDateDesc_;
    private String releaseDate_;
    private int sameS_ = 0;
    private String version_;

    public /* synthetic */ int compare(Object obj, Object obj2) {
        return ॱ((UpdateRecordCardBean) obj, (UpdateRecordCardBean) obj2);
    }

    public int ॱ(UpdateRecordCardBean updateRecordCardBean, UpdateRecordCardBean updateRecordCardBean2) {
        if (!(updateRecordCardBean == null || updateRecordCardBean2 == null)) {
            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd", Locale.US);
            try {
                Date parse = simpleDateFormat.parse(updateRecordCardBean.ꜟ());
                Date parse2 = simpleDateFormat.parse(updateRecordCardBean2.ꜟ());
                if (parse == null || parse2 == null) {
                    czi.ˎ.ˊ(TAG, "formatDate Result is Null");
                    return 0;
                } else if (parse.getTime() > parse2.getTime()) {
                    return -1;
                } else {
                    if (parse.getTime() == parse2.getTime()) {
                        if (updateRecordCardBean.ꜞ() > updateRecordCardBean2.ꜞ()) {
                            return -1;
                        }
                        if (updateRecordCardBean.ꜞ() < updateRecordCardBean2.ꜞ()) {
                            return 1;
                        }
                        if (updateRecordCardBean.ʽ() > updateRecordCardBean2.ʽ()) {
                            return 1;
                        }
                        if (updateRecordCardBean.ʽ() == updateRecordCardBean2.ʽ()) {
                            return 0;
                        }
                        if (updateRecordCardBean.ʽ() < updateRecordCardBean2.ʽ()) {
                            return -1;
                        }
                    }
                    if (parse.getTime() < parse2.getTime()) {
                        return 1;
                    }
                }
            } catch (ParseException e) {
                czi.ˎ.ˊ(TAG, e.toString());
                return 0;
            }
        }
        return 0;
    }

    public String ॱ() {
        return this.oldVersionName_;
    }

    public void ˈ(String str) {
        this.oldVersionName_ = str;
    }

    public String ˊ() {
        return this.version_;
    }

    public void ʼॱ(String str) {
        this.version_ = str;
    }

    public long ʽ() {
        return this.diffSize_;
    }

    public void ˏ(long j) {
        this.diffSize_ = j;
    }

    public void ʾ(String str) {
        this.diffHash_ = str;
    }

    public void ˎˏ(String str) {
        this.oldHashCode = str;
    }

    public void ͺॱ(String str) {
        this.oldMD5Code = str;
    }

    public void ˑ(String str) {
        this.hash_ = str;
    }

    public void ʽ(int i) {
        this.sameS_ = i;
    }

    public String ꜟ() {
        return this.releaseDate_;
    }

    public void ॱʻ(String str) {
        this.releaseDate_ = str;
    }

    public int ꓸ() {
        return this.oldVersionCode_;
    }

    public void ᐝ(int i) {
        this.oldVersionCode_ = i;
    }

    public String ㆍ() {
        return this.newFeatures_;
    }

    public void ॱʼ(String str) {
        this.newFeatures_ = str;
    }

    public void ʼ(int i) {
        this.kindId_ = i;
    }

    public String ᶥ() {
        return this.releaseDateDesc_;
    }

    public void ॱʽ(String str) {
        this.releaseDateDesc_ = str;
    }

    public int ꜞ() {
        return this.apkReadySouce;
    }

    public void ॱˊ(int i) {
        this.apkReadySouce = i;
    }

    public boolean ꞌ() {
        return this.isExpand;
    }

    public void ॱ(boolean z) {
        this.isExpand = z;
    }

    public boolean ﾟ() {
        return this.isLastCard;
    }

    public void ˎ(boolean z) {
        this.isLastCard = z;
    }

    public boolean ʹ() {
        return this.isIgnoreShow;
    }

    public void ˊ(boolean z) {
        this.isIgnoreShow = z;
    }
}
